package com.hb.core.pojo.project.evaluation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hb.core.pojo.project.evaluation.dto.EvaluationCommitteeMembersDTO;
import com.hb.core.pojo.project.evaluation.entity.EvaluationCommitteeMembers;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 评标委员会成员信息 Mapper 接口
 * </p>
 *
 * @author ljs
 * @since 2022-1-17 11:39:18
 */
public interface EvaluationCommitteeMemberMapper extends BaseMapper<EvaluationCommitteeMembers> {

    /**
     * 根据身份证号与密码查询
     * @param idCard
     * @param password
     * @return
     */
    EvaluationCommitteeMembersDTO findByMemberIdCardAndPassword(@Param("idCard") String idCard, @Param("password") String password);

    /**
     * 根据手机号与密码查询
     * @param mobile
     * @param password
     * @return
     */
    EvaluationCommitteeMembersDTO findByMemberMobileAndPassword(@Param("mobile") String mobile, @Param("password") String password);
    /**
     *
     * @Description:
     * @Author: zhongdl
     * @Date:2022/2/15 15:19
     * @param evaluationCommitteeId:
     * @return: {@link Long }
     **/
    Long getVotesLeaderId(@Param("evaluationCommitteeId")Long evaluationCommitteeId);

    /**
    * Description: 根据标段id查询当前标段下的专家身份证号
    * @author: fengbin
    * @date: 2022/2/24 15:32
    * @param sectionId
     @return: java.util.List<java.lang.String>
    */
    List<String>listExpertIdCardBySectionId (@Param("sectionId") Long sectionId);

    /**
     * 根据标段id查询评委会成员列表
     * @param sectionId
     * @return
     */
    List<EvaluationCommitteeMembers> findBySectionId(@Param("sectionId") Long sectionId);

    /**
     * 重新指定专家后需要将组长信息清空
     *
     * @author tian
     * @date 2022-6-7 16:12
     * @param evaluationCommitteeId
     */
    void updateLeaderIdByEvaluationCommitteeId(@Param("evaluationCommitteeId") Long evaluationCommitteeId);


    /**
     * 查评委会会专家信息
     *
     * @author tian
     * @date 2022-6-18 14:37
     * @param evaluationCommitteeMembers
     * @return java.util.List<com.hb.core.pojo.project.evaluation.entity.EvaluationCommitteeMembers>
     */
    List<EvaluationCommitteeMembers> selectInfoByEvaluationCommitteeIdAndMemberType(EvaluationCommitteeMembers evaluationCommitteeMembers);
}
